import { createRouter,createWebHashHistory } from "vue-router";
import Login from './view/Login.vue'
import Main from './view/Main.vue'
import User from './view/user/index.vue'
import Product from './view/product/index.vue'
import Text from './view/first/Text.vue'
import Aside from './view/first/Aside.vue'
import Video from './view/first/Video.vue'
import Quanxian from './view/quanxian/index.vue'
import Img from './view/img/index.vue'



//路由懒加载
const Category = () => import('./view/first/category.vue')

const routes = [
  { path: '/', component: Login },
  {
    path: '/main', component: Main, name: "main",
    children: [
      { path: "user", component: User },
      { path: "/first-text", component: Text },
      { path: "/first-aside", component: Aside },
      { path: "/first-video", component: Video },
      { path: "/quanxian", component: Quanxian },
      { path: "/img", component: Img },
      { path: "/product", component: Product }
    ]
  },

]

const router = createRouter({
  history: createWebHashHistory(),
  routes, 
})
export default router;